home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 4,101 to 4,200 / aol-file-protocol-4400-4101-to-4200.zip / AOLDLs / ADV - Message Board Archives / Archived Msgs_ Count Font Sizes / ADV.FONT.sizes next >
Internet Message Format  |  2014-11-30  |  2KB

  1. Path: IIGS Toolbox/Font Size Menus
  2.  
  3. Subj:  Size Menu                             91-07-05 22:26:28 EST
  4. From:  Damien9
  5. Posted on: America Online
  6.  
  7. I'm looking for a method of indicating (within a menu) which sizes are available (without scaling) for a given font.  Sort of like the size menu in WriteIt!, AWGS, etc.
  8.  
  9. Jeff
  10.  
  11. Path: IIGS Toolbox/Font Size Menus
  12.  
  13. Subj:  one way...                            91-07-10 03:03:02 EST
  14. From:  A2Pro Tim
  15. Posted on: America Online
  16.  
  17. Call CountFamilies to get the number of different font families in your system, then loop through each family calling CountFonts to find out how many fonts in each family.  From there, you should be able to call FindFontStats to step through the sizes (9, 10, 12, 14, 16, 18, etc) that are normally in your menu to see which of those sizes really do exist.
  18.  
  19. There are probably better ways, but it's late, I'm tired and I never had to think about this before...  :-)
  20.  
  21. 'Sides, that's more elegant than stepping through the directory of your */System/Fonts folder and parsing things manually...  :-)
  22.  
  23. Tim S.
  24.  
  25. Path: IIGS Toolbox/Font Size Menus
  26.  
  27. Subj:  Font Size Menus                       91-07-10 19:03:53 EST
  28. From:  Damien9
  29. Posted on: America Online
  30.  
  31. Thanks, Tim.
  32.  
  33. I figured it out, tho'.  All you need to do is each time the font changes, call CountFonts once for each size you have in your menu, and set the menu style to indicate if the font exists or not. It goes pretty quick too...
  34.  
  35. Jeff
  36.  
  37. Looking for a method of determining which sizes are real for a given font...
  38.  
  39.